<extend name="Public:base" />
<block name="title"><title>心e购-我的收藏</title></block>
<block name="body">
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">收藏的商品</h1>
	</header>
	<div class="mui-content">
		<div class="wdsc">
			<div class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-negative">
				<a class="mui-control-item" href="/Wap/Member/favorited">收藏的店铺</a>
				<a class="mui-control-item mui-active" href="/Wap/Member/favoritep">收藏的商品</a>
			</div>
			<section class="scsp">
				<ul class="gcw_list">
					<volist name="collects" id="vo">
					<li class="list_box">
						<div class="gwc_list_content">
							<div class="img_box">
								<img src="{$vo.pic}"/>
							</div>
							<div class="sp_xx">
								<div class="">
									<p class="sp_title mui-ellipsis">1.{$vo.productname}</p>
								</div>
								<div>
									<p class="sp_jg">价格：<span>￥{$vo.price}</span></p>
									<p class="sc_cz">
										<a href="#popover1">
											<i class="mui-icon mui-icon-more-filled"></i>
										</a>
									</p>
									<div id="popover1" class="mui-popover">
										<nav class="scsp_nav">
										  <a href="/Wap/shop/index?store_id={$vo.st_id}">去他店铺1</a>
										  <a href="/Wap/Product/detail?id={$vo.g_id}">查看详情</a>
										  <a href="javascript:collect_delete({$vo.c_id});">取消关注</a>
										</nav>
									</div>
								</div>
							</div>
						</div>
					</li>
					</volist>
				</ul>
			</section>
		
		</div>
	</div>
</block>
<block name="script">
	<script>
		function collect_delete(id) {
			mui.post('/Wap/Index/delete_collect', {
					id: id
				}, function(data) {
					if(data.code === 0) {
						location.reload();
					} else if(data.code === 2) {
						location.href="/Wap/Member/login";
					} else {
						alert(data.message);
					}
				}, 'json');
		}
	</script>
</block>